package org.lanqiao.taru.controller;


import org.lanqiao.taru.annotation.Monitor;
import org.lanqiao.taru.common.Result;
import org.lanqiao.taru.domain.TbUserinfo;
import org.lanqiao.taru.service.ArticleService;
import org.lanqiao.taru.vo.TbArticleVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequestMapping("/article")
public class ArticleController {


    @Autowired
    ArticleService  articleService;


    /**
     * 根据主键查询
     * @param id
     * @return
     */

    @GetMapping("/getArticleById/{id}")
    public Result getArticleById(@PathVariable("id") Long  id){
        TbArticleVo   articleVo =  articleService.getArticleInfoById(id);
        return Result.OK("成功",articleVo);
    }


    /**
     * 测试
     * @return
     */
    @PostMapping("/ceshi")
    public Result ceshi(){
        return Result.OK("测试","测试");
    }


}
